package com.xnyzc.lhy.common.penum.billRules;

/**
 * @Author: huxuekuo
 * @Date: 2019-08-13 16:17
 * @Description:
 */
public enum EUseTimeType {
    conventional(0, "常规"), offDay(1, "节假日");
    private int type;
    private String typeName;

    EUseTimeType(int type, String typeName) {
        this.type = type;
        this.typeName = typeName;
    }

    /**
     * 查询性别
     * @param type
     * @return
     */
    public static EUseTimeType findType(Integer type) {
        EUseTimeType eUseTimeType;
        switch (type) {
            case 0:
                eUseTimeType = EUseTimeType.conventional;
                break;
            case 1:
                eUseTimeType = EUseTimeType.offDay;
                break;
            default:
                throw new IllegalArgumentException("未设置");
        }
        return eUseTimeType;
    }

    public int getType() {
        return this.type;
    }

    public String getTypeName() {
        return typeName;
    }
}
